package com.gxa.mapper;

import com.gxa.common.R;
import com.gxa.pojo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface OrdersMapper {
    List<Map> queryOrdersList(Integer param1, Integer param2);

//    List<Orders> search(@Param("customer_name") String customer_name, @Param("consignee_phone") String consignee_phone,@Param("order_id") String order_id);


    int deleteByOrder_id(String order_id,Integer status);

    List<Customer> queryCustomer(@Param("customer_id") String customer_id);

    /**
     * 修改订单状态
     * @param status
     * @return
     */
    int updateStatus(@Param("status") Integer status,@Param("order_id") String order_id);

    /**
     * 修改订单发货状态
     * @param shippingStatus
     * @return
     */
    int updateShippingStatus(@Param("shippingStatus") Integer shippingStatus,@Param("order_id") String order_id);


    List<Map> queryByName(Integer customer_id,Integer param1,Integer param2);

    /**
     * 查询订单商品
     * @param order_id
     * @return
     */
    List<Map> queryOrderGoods(@Param("order_id") String order_id, @Param("params1") Integer params1, @Param("params2") Integer params2);

    /**
     * 修改订单已收款金额
     * @param received
     * @return
     */
    int updateReceived(@Param("received") Integer received, @Param("order_id") String order_id);

    /**
     * 添加订单商品
     * @param order_id
     * @param goods_id
     * @return
     */
    int addGoodOrder(@Param("order_id") String order_id, @Param("goods_id") Integer goods_id);                                                                                             /**
     * 假删除订单商品
     * @param order_id
     * @param order_goods_id
     * @param order_goods_status
     * @return
     */
    /**
     * 删除订单商品
     * @param order_id
     * @param order_goods_id
     * @param order_goods_status
     * @return
     */
    int deleteOrderGoods(@Param("order_id") String order_id,@Param("order_goods_id") Integer order_goods_id,@Param("order_goods_status") Integer order_goods_status);
    /**
     * 查询商品信息
     * @param params1
     * @param params2
     * @return
     */
    List<Map> queryGoodsList(Integer params1, Integer params2);

    /**
     * 查询订单商品总条数
     * @return
     */
    int queryAllOrdersGoods(String order_id);

    /**
     * 修改订单商品的信息
     * @return
     */
    int updateOrderGoods(Map map);

    /**
     * 商品数量
     * @return
     */
    int queryGoods();


    List<Map> queryById(String order_id);

    List<Map> queryByOrder_date(Integer param1,Integer param2);

    List<Map> queryByDate(Integer param1,Integer param2);

    List<Map> queryMonth(Integer param1,Integer param2);

    int countByOrders_id(String conn);

    List<Map> searchByOrders_id(String conn,Integer param1,Integer param2);

    int countByContact_phone(String conn);

    List<Map> searchByContact_phone(String conn,Integer param1,Integer param2);

    int countByCustomer_name(String conn);

    List<Map> searchByCustomer_name(String conn,Integer param1,Integer param2);

    int queryTotalSize();

    int queryTotal();

    int querySize();

    int queryCount();

    List<Map> queryOrders(Integer param1, Integer param2);

    int queryResult();

    int countByCustomer(String argument);

    List<Map> searchByCustomer(String argument,Integer param1,Integer param2);

    int countByContact(String argument);

    List<Map> searchByContact(String argument,Integer param1,Integer param2);

    int countByContact_name(String argument);

    List<Map> searchByContact_name(String argument,Integer param1,Integer param2);

    Integer updateByOrder_Id(Map map);

    int queryTotalByOrder_id(String conn);

    int queryTotalByContact_phone(String conn);

    int queryTotalByCustomer_name(String conn);

    int queryTotalResult(Integer customer_id);

    List<Employee> queryEmployee();

    Integer countOrdersByEmployee(@Param("employee_name") String employee_name,@Param("start_time") String start_time, @Param("stop_time") String stop_time);

    List<Dept> queryDept();

    Integer countOrdersByDept(@Param("dept_name") String dept_name,@Param("start_time") String start_time,@Param("stop_time") String stop_time);

    Integer add(Map map);

    List<Map> findAll();

    int findNumber(Integer number1);

    int findNumberStatus(Integer number2);

    List<Map> findMonye(Integer number3);

    int countNull();

    List<Map> queryNull(Integer param1, Integer param2);

    int queryNo();

    int deletecustomerorders(Integer customer_Id);

    List<String> findOrders(Integer customer_Id);

    int deleteCustomerOrderGoods(String order_id);

    Integer searchFail(String conn);
}
